<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    // let i = 0;
    // document.onmousemove = function(){
    //     i++
    //     console.log(i);
    // }
    
    let i = 0;
    let t = null;
    document.onmousemove = function(){

        clearTimeout(t);
        t = setTimeout(function(){

            i++;
            console.log(i);

        }, 100)

    }
    






</script>
</html>